package mobidever.mygodutch.adapter;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import mobidever.mygodutch.R;
import mobidever.mygodutch.adapter.base.AdapterBase;
import mobidever.mygodutch.controls.SliderItem;

public class AdapterSliderMenu extends AdapterBase
{

	private class Holder
	{
		TextView tvMenuName;
	}

	public AdapterSliderMenu(List pList, Context pContext)
	{
		super(pList, pContext);
	}

	public View getView(int position, View convertView, ViewGroup parent)
	{
		Holder _Holder;
		SliderItem _SliderItem;
		if (convertView == null)
		{
			convertView = getLayoutInflater().inflate(
					R.layout.slidermenu_list_item, null);

			_Holder = new Holder();

			_Holder.tvMenuName = (TextView) convertView
					.findViewById(R.id.tvMenuName);
			convertView.setTag(_Holder);
		} else
		{
			_Holder = (Holder) convertView.getTag();
		}
		_SliderItem = (SliderItem) getList().get(position);
		_Holder.tvMenuName.setText(_SliderItem.getItemName());
		return convertView;
	}

}
